<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <!-- v-bind 给html标签的属性绑定 -->
    <div id="app">
        <a v-bind:href="link">gogogo</a>

        <!-- class,style -->
        <span v-bind:class="{active:isActive,'has-error':hasError}"
            :style="{color:colorText,'font-size': fontSize}">你好</span>

        <!-- v-bind:style 可以简写为:style -->
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                link: "http://www.baidu.com",
                isActive: false,
                hasError: false,
                colorText: 'red',
                fontSize: '36px'


            }
        });
    </script>
</body>

</html>